package com.jgp.glmeeting.repository;

import com.jgp.glmeeting.model.Meeting;
import com.jgp.sys.common.repository.JGPRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface MeetingRepository extends JGPRepository<Meeting,String> {

    /**
     * 根据参会人员Id查询会议
     * @param participantsId
     * @return
     */
    @Query("select m from Meeting m, MeetingParticipantsRelation mpr where m.id = mpr.meetingId and mpr.participantsId = :participantsId")
    List<Meeting> queryListByParticipantsId(@Param("participantsId") String participantsId);
}
